<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2024/8/17
  Time: 20:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加工单</title>

    <%
        String base = request.getContextPath() + "/";
        String url = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + base;
    %>
    <base href="<%=url%>">
    <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("[type='button']").click(function () {
                var id = $("#q").val();
                var val = $("#w").val();
                var val1 = $("#e").val();
                var val2 = $("#r").val();
                $.get("work/addWork", {
                    "id": id,
                    "executor": val,
                    "description": val1,
                    "orderLevel": val2
                }, function (B) {
                    JSON.stringify(B)
                    if (B) {
                        alert("cheng"+id)
                        window.location.href="sel.jsp?boo="+B
                    } else {
                        alert("dadad")
                        window.location.href="sel.jsp?boo="+B
                    }
                });
            });
        });


    </script>
</head>
<body>
<table border="1px">
    <tr>
        <td colspan="2">添加工单</td>
    </tr>
    <tr>
        <td>执行人(*)</td>
        <td><input type="text" name="ss" id="w"/></td>
    </tr>
    <tr>
        <td>任务描述</td>
        <td><input type="text" name="dd" id="e"/></td>
    </tr>
    <tr>
        <td rowspan="2">级别</td>
        <td rowspan="2">
            <select id="r">
                <option value="1">1级</option>
                <option value="2">2级</option>
                <option value="3">3级</option>
            </select>
        </td>
    </tr>
    <tr>
        <td colspan="2"><input type="button" value="提交" id="t"/></td>
    </tr>
</table>
<input type="hidden" id="q" value="<%=request.getParameter("pId")%>"/>
</body>
</html>
